package com.ruoyi.wjq.domain;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.fk.domain.Question;
import com.ruoyi.youyou.domain.SysYouYouUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 考友点评对象 user_comment
 * 
 * @author wjq
 * @date 2025-08-12
 */
public class UserComment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 点评ID */
    private Long id;

    /** 题目ID */
    @Excel(name = "题目ID")
    private Long questionId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 笔记内容 */
    @Excel(name = "笔记内容")
    private String content;

    /** 点赞数量 */
    @Excel(name = "点赞数量")
    private Long likeCount;

    /** 收藏数量 */
    @Excel(name = "收藏数量")
    private Long collectCount;

    /** 0为已删除，1为保存 */
    private Long del;

    private SysYouYouUser sysYouYouUser;
    private Question question;

    // 新增：仅用于查询的字段（不映射数据库，纯粹条件）
    private String nickName; // 仅用于查询的用户昵称
    private String title;    // 仅用于查询的题目标题

    // 新增查询字段的 getter/setter
    public String getNickName() { return nickName; }
    public void setNickName(String nickName) { this.nickName = nickName; }

    public String getTitle() { return title; }
    public void setTitle(String title) { this.title = title; }

    public SysYouYouUser getSysYouYouUser() {
        return sysYouYouUser;
    }

    public void setSysYouYouUser(SysYouYouUser sysYouYouUser) {
        this.sysYouYouUser = sysYouYouUser;
    }

    public Question getQuestion() {
        return question;
    }

    public void setQuestion(Question question) {
        this.question = question;
    }



    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setQuestionId(Long questionId) 
    {
        this.questionId = questionId;
    }

    public Long getQuestionId() 
    {
        return questionId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setLikeCount(Long likeCount) 
    {
        this.likeCount = likeCount;
    }

    public Long getLikeCount() 
    {
        return likeCount;
    }

    public void setCollectCount(Long collectCount) 
    {
        this.collectCount = collectCount;
    }

    public Long getCollectCount() 
    {
        return collectCount;
    }

    public void setDel(Long del) 
    {
        this.del = del;
    }

    public Long getDel() 
    {
        return del;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("questionId", getQuestionId())
            .append("userId", getUserId())
            .append("content", getContent())
            .append("likeCount", getLikeCount())
            .append("collectCount", getCollectCount())
            .append("createTime", getCreateTime())
            .append("del", getDel())
            .append("sysYouYouUser", getSysYouYouUser())   // 新增关联对象打印
            .append("question", getQuestion()) // 新增关联对象打印
            .append("nickName", getNickName()) // 打印查询用的昵称
            .append("title", getTitle())       // 打印查询用的标题
            .toString();
    }
}
